<template>
  <div class="admin-home">
    <el-container style="height: 500px; border: 1px solid #eee">
      <el-aside width="200px" style="background-color: rgb(238, 241, 246)">
        <div class="admin-home-menu">
          <el-menu
              :default-active="activeIndex2"
              class="el-menu-demo"
              mode="vertical"
              @select="handleSelect"
              background-color="#545c64"
              text-color="#fff"
              :router="true"
              active-text-color="#ffd04b">
            <el-submenu index="1">
              <span slot="title">题目管理</span>
              <el-menu-item index="/admin/contestList">比赛管理</el-menu-item>
              <el-menu-item index="/admin/problemList">题目管理</el-menu-item>
              <el-menu-item index="/admin/rejudge">题目重测</el-menu-item>
            </el-submenu>


            <el-submenu index="2">
              <span slot="title">课程管理</span>
              <el-menu-item index="/admin/course">课程管理</el-menu-item>
              <el-menu-item index="/admin/category">分类管理</el-menu-item>
              <el-menu-item index="/admin/teacher">讲师管理</el-menu-item>
            </el-submenu>


            <el-submenu index="3">
              <span slot="title">系统管理</span>
              <el-menu-item index="/admin/examineUser">用户审核</el-menu-item>
              <el-menu-item index="/admin/resource">资源管理</el-menu-item>
              <el-menu-item index="/admin/role">角色管理</el-menu-item>
            </el-submenu>
            <el-menu-item index="/admin/file">文件管理</el-menu-item>

          </el-menu>
        </div>

      </el-aside>
      <el-main>
        <router-view/>

      </el-main>
    </el-container>


  </div>

</template>

<script>
export default {
  name: "AdminHome",
  data() {
    return {
      activeIndex: '1',
      activeIndex2: '1'
    };
  },
  methods: {
    handleSelect(key, keyPath) {
      console.log(key, keyPath);
    }
  }
}
</script>

<style scoped>
.el-header {
  background-color: #B3C0D1;
  color: #333;
  line-height: 60px;
}

.el-aside {
  color: #333;
}
</style>
